<template>
  <div class="list">
        <van-nav-bar title="图文资讯" left-text="返回" left-arrow
      @click-left="$router.back()"
      >
  <template #right>
    <van-icon name="search" size="18" />
  </template>
</van-nav-bar>
      <div class="listS" v-for="item in newsList" :key="item.id" v-html="item.content">

      </div>
      <div class="xia">
          <p>提交评论</p>
          <div class="xia-list">
              <input type="text" placeholder="请输入评论内容" class="input" >
              <div class="xia-k">
                  发表
              </div>
          </div>
      </div>
     
  </div>
</template>

<script>
import {getPageNewData} from '../../apis/api'
export default {
data () {
    return {
        newsList:[],
        
    }
},
async created () {
    const res = await getPageNewData(this.$route.params.id)
    console.log(res);
    this.newsList=res.message
    
}
}

</script>

<style lang="less" scoped>
.list{
    .listS{
        // background-color: red;
        border: 1px solid rgb(189, 184, 184);
        height: 230px;
       text-overflow: -o-ellipsis-lastline;
  overflow: auto;
  text-overflow: ellipsis;
  display: -webkit-box;
  
  
  -webkit-box-orient: vertical;
    }
    .xia{
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        //  background-color: red;
        border: 1px solid rgb(189, 184, 184);
        height: 300px;
        p{
            font-size: 20px;
            color: #000;
            flex-wrap: 700;
            position: relative;
            left: -137px;
            top: 0;

            
        }
        .input{
            width: 300px;
            height: 100px;
        }
    .xia-k{
        margin-top: 20px;
       margin-left: 30px;
        width: 310px;
        height: 50px;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: aqua;
    }
    }
}
</style>